package com.gitee.magic.framework.head.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;

/**
 * @author start
 */
public class ObjectVO<T> extends BaseVO {
	
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public ObjectVO() {
	}
	
	public ObjectVO(int code,String message, String logno,String name) {
		super(code,message, logno,name);
	}

	@Schema(description = "状态码为200时返回",requiredMode = RequiredMode.REQUIRED)
	private T data;
	
	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
//		setResult(data);
	}

	private T result;

	@Deprecated
	@Schema(description = "响应数据 状态码为200时返回",requiredMode = RequiredMode.REQUIRED,hidden = true)
	public T getResult() {
		return result;
	}

	public void setResult(T result) {
		this.result = result;
	}

	@Override
	public String toString() {
		return "ObjectVO{" +
				"data=" + data +
				'}';
	}
}
